/**
 * 计算斐波拉契数列第n项
 */

var fib1 = n => {
    if (n == 1 || n == 2) {
        return 1
    }
    return fib1(n - 1) + fib1(n - 2)
}

function fib2(n) {
    if (n == 1 || n == 2) {
        return 1
    }
    return fib2(n - 1) + fib2(n - 2)
}

println(fib1(10))
println(fib1(20))
println(fib2(10))
println(fib2(20))
